package validation;


import net.sf.oval.configuration.annotation.AbstractAnnotationCheck;
import net.sf.oval.context.OValContext;
import net.sf.oval.exception.OValException;
import net.sf.oval.Validator;

public class Charcheck extends AbstractAnnotationCheck<Chars> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public boolean isSatisfied(
								Object validatedObject, 
								Object value, 
								OValContext context, 
								Validator validator)
		throws OValException
	  {
	    if (value == null) return true;

	    String val = value.toString();
	    
	     char[]v=val.toCharArray();
	     for(int i=0;i<val.length();i++){
	    	 if(v[i]=='1'||v[i]=='2'||v[i]=='3'||v[i]=='4'||
	    			 v[i]=='5'||v[i]=='6'||v[i]=='7'||v[i]=='8'||v[i]=='9')
	    		 return false;
	    		
	    	    		
	    		
	     
	  }
	    return true;  
	}

	



}
